﻿using System;
using System.Collections.Generic;
using System.Text;
using GalaSoft.MvvmLight.Ioc;
using MasterDetailTemplate.Services;
using MasterDetailTemplate.Services.impl;

namespace MasterDetailTemplate.ViewModels
{
    /// <summary>
    /// ViewModel定位器。
    /// </summary>
    public class ViewModelLocator
    {
        public HealthInfoViewModel HealthInfoViewModel =>
            SimpleIoc.Default.GetInstance<HealthInfoViewModel>();
        public ViewModelLocator() {
            SimpleIoc.Default.Register<IAlertService, AlertService>();
            SimpleIoc.Default.Register<IPreferenceStorage, PreferenceStorage>();
            SimpleIoc.Default.Register<IHealthInfoService, HealthInfoService>();
            SimpleIoc.Default.Register<HealthInfoViewModel>();

        }
    }
}
